/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package botoseis.mainGui.database;

import java.awt.Component;
import java.awt.Frame;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.DefaultListModel;
import javax.swing.JOptionPane;

/**
 *
 * @author wogonowski
 */
public class DB3Ddisplay extends javax.swing.JFrame {
    Connection con=null;
    ResultSet rs = null;
    PreparedStatement pst = null;
    /**
     * Creates new form DB3Ddisplay
     */
    public DB3Ddisplay() {
        initComponents();
        
        modelP = new DefaultListModel();
        modelL = new DefaultListModel();
        modelAT = new DefaultListModel();
        modelAX = new DefaultListModel();
        modelAY  = new DefaultListModel();
        modelAZ  = new DefaultListModel();
        setTitle("Database Utlilities");
        //Define model for jList
        jList1.setModel(modelP);
        jList2.setModel(modelL);
        jList3.setModel(modelAT);
        jList4.setModel(modelAX);
        jList5.setModel(modelAY);
        jList6.setModel(modelAZ);
         con=DBConnect.ConnectDb();
             try {  
                   modelP.clear();
                   modelAT.clear();
                   modelL.clear();
                   modelAX.clear();
                   modelAY.clear();
                   modelAZ.clear();
                   String queryP ="select * from project";
                   pst=con.prepareStatement(queryP);
                   rs = pst.executeQuery();
                while (rs.next()) { 
                    modelP.addElement(rs.getString("NAME"));  
                } 
                    
            } catch (Exception e) {  
            System.out.println("Retrieving Data Fail");  
            } finally {
                 try {
                 rs.close();
                 pst.close();
                //con.close();
                }
                 catch (Exception e) {
                 }
             }                 
        
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel2 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jList1 = new javax.swing.JList();
        jScrollPane3 = new javax.swing.JScrollPane();
        jList2 = new javax.swing.JList();
        jScrollPane4 = new javax.swing.JScrollPane();
        jList3 = new javax.swing.JList();
        jScrollPane5 = new javax.swing.JScrollPane();
        jList4 = new javax.swing.JList();
        jScrollPane6 = new javax.swing.JScrollPane();
        jList5 = new javax.swing.JList();
        jScrollPane7 = new javax.swing.JScrollPane();
        jList6 = new javax.swing.JList();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        Exit = new javax.swing.JButton();
        DisplayChart = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Select database "));

        jList1.setBorder(null);
        jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList1.setMaximumSize(new java.awt.Dimension(160, 35700));
        jList1.setMinimumSize(new java.awt.Dimension(160, 200));
        jList1.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList1.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList1MouseClicked(evt);
            }
        });
        jScrollPane2.setViewportView(jList1);

        jList2.setBorder(null);
        jList2.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList2.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList2.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList2MouseClicked(evt);
            }
        });
        jScrollPane3.setViewportView(jList2);

        jList3.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList3.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList3.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList3.setVisibleRowCount(7);
        jList3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jList3MouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(jList3);

        jList4.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList4.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList4.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList4.setVisibleRowCount(7);
        jScrollPane5.setViewportView(jList4);

        jList5.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList5.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList5.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList5.setVisibleRowCount(7);
        jScrollPane6.setViewportView(jList5);

        jList6.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jList6.setSelectionBackground(new java.awt.Color(255, 245, 185));
        jList6.setSelectionForeground(new java.awt.Color(0, 0, 0));
        jList6.setVisibleRowCount(7);
        jScrollPane7.setViewportView(jList6);

        jLabel1.setBackground(new java.awt.Color(80, 113, 220));
        jLabel1.setForeground(new java.awt.Color(255, 255, 255));
        jLabel1.setText("  Project");
        jLabel1.setOpaque(true);

        jLabel2.setBackground(new java.awt.Color(80, 113, 220));
        jLabel2.setForeground(new java.awt.Color(255, 255, 255));
        jLabel2.setText("  Line");
        jLabel2.setOpaque(true);

        jLabel3.setBackground(new java.awt.Color(80, 113, 220));
        jLabel3.setForeground(new java.awt.Color(255, 255, 255));
        jLabel3.setText(" X attribute");
        jLabel3.setOpaque(true);

        jLabel4.setBackground(new java.awt.Color(80, 113, 220));
        jLabel4.setForeground(new java.awt.Color(255, 255, 255));
        jLabel4.setText(" Z attribute");
        jLabel4.setOpaque(true);

        jLabel5.setBackground(new java.awt.Color(80, 113, 220));
        jLabel5.setForeground(new java.awt.Color(255, 255, 255));
        jLabel5.setText(" Y attribute");
        jLabel5.setOpaque(true);

        jLabel6.setBackground(new java.awt.Color(80, 113, 220));
        jLabel6.setForeground(new java.awt.Color(255, 255, 255));
        jLabel6.setText(" Type of attribute");
        jLabel6.setOpaque(true);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 140, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane7)
                    .addComponent(jScrollPane6, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane4)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );

        Exit.setText("Exit");
        Exit.setPreferredSize(new java.awt.Dimension(120, 29));
        Exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExitActionPerformed(evt);
            }
        });

        DisplayChart.setText("Display map");
        DisplayChart.setToolTipText("Display XY chart of selected attribute database");
        DisplayChart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        DisplayChart.setMaximumSize(new java.awt.Dimension(140, 29));
        DisplayChart.setMinimumSize(new java.awt.Dimension(140, 29));
        DisplayChart.setPreferredSize(new java.awt.Dimension(140, 29));
        DisplayChart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DisplayChartActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(DisplayChart, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(175, 175, 175)
                .addComponent(Exit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(33, 33, 33))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(Exit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(DisplayChart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jList1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList1MouseClicked

        try {
            con=DBConnect.ConnectDb();
            modelL.clear();
            modelAT.clear();
            modelAX.clear();
            modelAY.clear();
            modelAZ.clear();
            String project = jList1.getSelectedValue().toString();
            String queryL="SELECT line.name as name FROM line INNER JOIN project ON (project.id=line.pid ) WHERE project.name='"+project+"' ";
            pst=con.prepareStatement(queryL);
            rs = pst.executeQuery();
            while (rs.next()) {
                modelL.addElement(rs.getString("name"));
            }

        } catch (Exception e) {
            System.out.println("Retrieving Data Fail");
        } finally {
            try {
                rs.close();
                pst.close();
                //con.close();
            }
            catch (Exception e) {
            }
        }

    }//GEN-LAST:event_jList1MouseClicked

    private void jList2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList2MouseClicked
        try {
            con=DBConnect.ConnectDb();
            modelAT.clear();
            modelAX.clear();
            modelAY.clear();
            modelAZ.clear();
            String line = jList2.getSelectedValue().toString();
            String queryA ="select attr_type.name from attr_type WHERE attr_type.id IN (SELECT attr.tid FROM attr INNER JOIN line ON (attr.lid=line.id) WHERE line.name='"+line+"' GROUP BY attr.tid)";
            pst=con.prepareStatement(queryA);
            rs = pst.executeQuery();
            while (rs.next()) {
                modelAT.addElement(rs.getString("name"));
            }
        }catch (Exception e) {
            System.out.println("Retrieving Data Fail");
        } finally {
            try {
                rs.close();
                pst.close();
                //con.close();
            }
            catch (Exception e) {
            }
        }
    }//GEN-LAST:event_jList2MouseClicked

    private void ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExitActionPerformed
        dispose();
    }//GEN-LAST:event_ExitActionPerformed

    private void DisplayChartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DisplayChartActionPerformed
        // Call Display chart
                        
                       makeTmpDBAttr();
        
                       DBMap myChart = new botoseis.mainGui.database.DBMap();
                        myChart.setVisible(true);
    }//GEN-LAST:event_DisplayChartActionPerformed

    private void jList3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jList3MouseClicked
          //Show attributes DB
        try {
            con=DBConnect.ConnectDb();
            modelAX.clear();
            modelAY.clear();
            modelAZ.clear();
            String atype = jList3.getSelectedValue().toString();
            String line = jList2.getSelectedValue().toString();
            String queryA ="SELECT attr.name as name  FROM attr LEFT JOIN line ON (attr.lid=line.id) INNER JOIN  attr_type ON (attr.tid=attr_type.id ) WHERE attr_type.name='"+atype+"' and line.name='"+line+"'";
            pst=con.prepareStatement(queryA);
            rs = pst.executeQuery();
            while (rs.next()) {
                modelAX.addElement(rs.getString("name"));
                modelAY.addElement(rs.getString("name"));
                modelAZ.addElement(rs.getString("name"));        
            }
        }catch (Exception e) {
            System.out.println("Retrieving Data Fail");
        } finally {
            try {
                rs.close();
                pst.close();
                //con.close();
            }
            catch (Exception e) {
            }
        }
    }//GEN-LAST:event_jList3MouseClicked

    private void makeTmpDBAttr(){
     con=DBConnect.ConnectDb();
        try {
            String Line = jList2.getSelectedValue().toString();
            String atype = jList3.getSelectedValue().toString();

            // Attribute X
            String anameX=jList4.getSelectedValue().toString();
            String queryA="SELECT attr.id as aid, line.id as lid FROM attr LEFT JOIN line ON (attr.lid=line.id) INNER JOIN attr_type ON (attr.tid=attr_type.id ) WHERE line.name='"+Line+"' and attr_type.name='"+atype+"' and attr.name='"+anameX+"'";
            pst=con.prepareStatement(queryA);
            rs = pst.executeQuery();
            rs.next();
            int aidx=rs.getInt("aid");
            int lid=rs.getInt("lid");
            pst.close();
            rs.close();
            // con.close();
            String tableNameX=jList3.getSelectedValue().toString()+"_LID"+lid+"_AID"+aidx;
            //String query="SELECT x,y FROM ["+tableName+"]";
              //     pst=con.prepareStatement(query);
              //     rs = pst.executeQuery();
           // Attribute Y        
            String anameY=jList5.getSelectedValue().toString();
            String queryY="SELECT attr.id as aidy FROM attr LEFT JOIN line ON (attr.lid=line.id) INNER JOIN attr_type ON (attr.tid=attr_type.id ) WHERE line.name='"+Line+"' and attr_type.name='"+atype+"' and attr.name='"+anameY+"'";
            pst=con.prepareStatement(queryY);
            rs = pst.executeQuery();
            rs.next();
            int aidy=rs.getInt("aidy");
            pst.close();
            rs.close();  
            String tableNameY=jList3.getSelectedValue().toString()+"_LID"+lid+"_AID"+aidy;
             // Attribute Z        
            String anameZ=jList6.getSelectedValue().toString();
            String queryZ="SELECT attr.id as aidz FROM attr LEFT JOIN line ON (attr.lid=line.id) INNER JOIN attr_type ON (attr.tid=attr_type.id ) WHERE line.name='"+Line+"' and attr_type.name='"+atype+"' and attr.name='"+anameZ+"'";
            pst=con.prepareStatement(queryZ);
            rs = pst.executeQuery();
            rs.next();
            int aidz=rs.getInt("aidz");
            pst.close();
            rs.close();  
            String tableNameZ=jList3.getSelectedValue().toString()+"_LID"+lid+"_AID"+aidz;
                   // Drop existing table
                String queryDrop="DROP TABLE IF EXISTS ATTRXYZ";
                pst=con.prepareStatement(queryDrop);
                pst.executeUpdate();           
            String qCreateTmp="CREATE TABLE IF NOT EXISTS ATTRXYZ (X1 DOUBLE, Y1 DOUBLE, Z1 DOUBLE)";                   
                pst=con.prepareStatement(qCreateTmp);
               pst.executeUpdate();       
                 // Import from other tables
                String queryIZ="INSERT INTO ATTRXYZ  (X1,Y1,Z1) SORTED SELECT  t1.X , t1.Y, z1.Y as Z FROM  (select  x1.ID as ID, x1.Y as X, y1.Y as Y  from  "+tableNameX+" as x1 join  "+tableNameY+" as y1 on x1.ID=y1.ID) as t1 join "+tableNameZ+" as z1 on t1.ID=z1.ID ";   
                pst=con.prepareStatement(queryIZ);
                pst.executeUpdate(); 
                //pst.close();        
                   
        }
        catch (Exception e){
            JOptionPane.showMessageDialog(null,e);
        }   
     
    }
    
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(DB3Ddisplay.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(DB3Ddisplay.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(DB3Ddisplay.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(DB3Ddisplay.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new DB3Ddisplay().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton DisplayChart;
    private javax.swing.JButton Exit;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JList jList1;
    private javax.swing.JList jList2;
    private javax.swing.JList jList3;
    private javax.swing.JList jList4;
    private javax.swing.JList jList5;
    private javax.swing.JList jList6;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    // End of variables declaration//GEN-END:variables
    private DefaultListModel modelP; 
    private DefaultListModel modelL;
    private DefaultListModel modelAT;
    private DefaultListModel modelAX;
    private DefaultListModel modelAY;
    private DefaultListModel modelAZ;

}
